C (12/301)

From:Steffen
Date:03 Aug 99 at 10:46:19
Subject:Re: (no subject)

From: Steffen <steffen.mars@stenloese.mail.telia.com>

On 01-Aug-99, Gabriele Svelto claimed:
>....
> Real programmers (TM) don't use debuggers! A little trick, if the proggie
> crashes before you could read the printf()s you can use fprintf() to write
> to a file stocked in a recoverable Ram Drive (such as RAD:). It's better
> than saving the file on your HD 'cos it won't be closed if the program
> crashes and you'll have to revalidate your partition. Otherwise you could
> use some code like that every time you call fprintf():
>
> file = fopen("debug_file.txt", "w");
> fprintf(file, /* put here what you want to print just like in printf() */ );
> (void) fclose(file);
>....
>

I suggest you keep the output routine as printf(), as you can easily redirect the output with a:
program >outputfile

Steffen